cmake_minimum_required(VERSION 3.15)

project(camera_test)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED true)
set(CMAKE_CXX_FLAGS "-g -Wall")
add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0)

find_package(PkgConfig REQUIRED)
find_package(sdbus-c++ REQUIRED)
pkg_check_modules(gstreamer REQUIRED IMPORTED_TARGET gstreamer-1.0 gstreamer-video-1.0 gstreamer-app-1.0)
#find_package(fmt REQUIRED)

file(GLOB ALL_SOURCE "src/*.hpp" "src/*.cpp")

include_directories(include)
include_directories(../include)
link_directories(
  lib/linux_x64
  lib/yaml
)

link_libraries(
  libyaml-cpp.a
  libssp.so
  PkgConfig::gstreamer
  pthread
  rt
  SDBusCpp::sdbus-c++
)

add_executable(camera_college ${ALL_SOURCE} run/main.cpp)
add_executable(SSP_College_test ${ALL_SOURCE} run/SSP_College_test.cpp)
add_executable(H264_Save_test ${ALL_SOURCE} run/H264Save_test.cpp)
add_executable(CameraClient_test run/CameraClient_test.cpp)
add_executable(StartMonitor run/StartMonitor.cpp)
add_executable(FrameCounter_test ${ALL_SOURCE} run/FrameCounter_test.cpp)
add_executable(StringRegex_test ${ALL_SOURCE} run/StringRegex_test.cpp)
add_executable(college_test ${ALL_SOURCE} run/testwork.cpp)
#这个连接不上去的
#add_executable(college_sdbusServer_test ${ALL_SOURCE} run/sdbusServer_test.cpp)
